﻿<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="LiveTiss.Guias.GuiaResumoInternacao"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    mc:Ignorable="d" x:Name="guia" Width="910">
    
    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter" />
    </UserControl.Resources>

    <StackPanel Width="910">
        <uc:CabecalhoGuia Value="{Binding Path=Guia.identificacaoGuiaInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
            TituloGuia="Guia de Resumo de Internação"/>
        <Grid Margin="0,10,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <StackPanel Margin="12,14,8,0">
                <uc:AutorizacaoGuia Value="{Binding Path=Guia.dadosAutorizacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
            </StackPanel>
        </Grid>
        <uc:Beneficiario  Value="{Binding Path=Guia.dadosBeneficiario, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <TextBlock TextWrapping="Wrap" Text="Dados do Contratado Executante" Margin="10,10,8,0" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="16"/>
            <StackPanel Margin="12,44,8,0">
                <uc:Contratado  Value="{Binding Path=Guia.identificacaoExecutante, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
            </StackPanel>
        </Grid>
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <TextBlock TextWrapping="Wrap" Text="Dados da Internação" Margin="10,10,8,0" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="16"/>
            <StackPanel Margin="12,44,8,0">
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Caráter da Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.caraterInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.caraterInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='EletivaEmergencia', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Tipo Acomodação Autorizada:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.acomodacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.acomodacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='TipoAcomodacao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Data/Hora da Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <sdk:DatePicker HorizontalAlignment="Left" Margin="0,6,0,0" SelectedDate="{Binding Path=Guia._dataHoraInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                        <toolkit:TimePicker HorizontalAlignment="Left" Margin="0,6,0,0" Value="{Binding Path=Guia._dataHoraInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Data/Hora da Saída Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <sdk:DatePicker HorizontalAlignment="Left" Margin="0,6,0,0" SelectedDate="{Binding Path=Guia._dataHoraSaidaInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                        <toolkit:TimePicker HorizontalAlignment="Left" Margin="0,6,0,0" Value="{Binding Path=Guia._dataHoraSaidaInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Tipo Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.tipoInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.tipoInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='TipoInternacao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Regime de Internação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <ComboBox Width="300" Margin="0,6,0,0" HorizontalAlignment="Left" Height="25" SelectedValue="Key" DisplayMemberPath="Value"
                            ItemsSource="{Binding Path=Guia.regimeInternacaoItems, ElementName=guia, Mode=OneWay}"
                            SelectedIndex="{Binding Path=Guia.regimeInternacao, ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='RegimeInternacao', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"
                            />
                    </StackPanel>
                    <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
                </Grid>
            </StackPanel>
        </Grid>
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <TextBlock TextWrapping="Wrap" Text="Internação Obstétrica" Margin="10,10,8,0" VerticalAlignment="Top" FontFamily="Segoe UI Semibold" FontSize="16"/>
            <StackPanel Margin="12,44,8,0">
                <uc:InternacaoObstetrica Value="{Binding Path=Guia.internacaoObstetrica, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                <Grid Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Margin="0" Grid.ColumnSpan="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="13.333" Text="Código da Operadora / CPF / CNPJ:"/>
                        <ComboBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" 
                            ItemsSource="{Binding Path=Guia.obitoNeonatal.obitoNeonatalItems,  ElementName=guia, Mode=OneWay}" SelectedValue="Key" DisplayMemberPath="Value"
                            SelectedIndex="{Binding Path=Guia.obitoNeonatal.ItemElementName,ElementName=guia, Converter={StaticResource enumConverter}, ConverterParameter='ObitoNeonatal', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                        <TextBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left"  MaxLength="2"  
                            Text="{Binding Path=Guia.obitoNeonatal.ItemValue, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Grid>
        <uc:DiagnosticoSaidaInternacao Value="{Binding Path=Guia.diagnosticosSaidaInternacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <!-- procedimentosRealizados -->
        <uc:ListaProcedimentosRealizados Value="{Binding Path=Guia.procedimentosRealizados, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:OPMUtilizada Value="{Binding Path=Guia.OPMUtilizadas, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:OutrasDespesas Value="{Binding Path=Guia.outrasDespesas, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <uc:ValorTotalServicos Value="{Binding Path=Guia.valorTotal, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
        <Grid Margin="0,19,0,0" VerticalAlignment="Top">
            <Rectangle RadiusY="6" RadiusX="6" Stroke="#4D898989"/>
            <StackPanel Margin="12,14,8,0">
                <Grid Height="53" Margin="0,0,6,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.024*"/>
                        <ColumnDefinition Width="0.976*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                        <TextBlock TextWrapping="Wrap" Text="Observação:" FontFamily="Segoe UI" FontSize="13.333"/>
                        <TextBox Margin="0,6,323,0" MaxLength="240" Text="{Binding Path=Guia.observacao, ElementName=guia, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
                    </StackPanel>
                </Grid>
            </StackPanel>
        </Grid>
    </StackPanel>
</UserControl>
